from builder import *

templates_with_encounters = []

templates_with_encounters.append(Template("""
###########
#111111111#
#.........#
#.........#
#.........#
O...s2....+
#.........#
#.........#
#.........#
#111111111#
###########
""",use_prob=0.5,level=5,lowercase_letters={'s':Special_grid(terrain='6',monster=M_SORCERER)},inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_WIZARD,E_HUMANOID]}))


templates_with_encounters.append(Template("""
###########
#111111111#
#.........#
#.........#
#.........#
#...s2....+
#.........#
####......#
#.........#
#r.#.11111#
###########
""",use_prob=0.5,level=5,lowercase_letters={'s':Special_grid(terrain='6',monster=M_SORCERER),'r':Special_grid(object=O_G_MAGE)},inheritable_properties={TP_IS_GOOD_ENCOUNTER:1,TP_THEMES:[E_WIZARD,E_HUMANOID]}))


templates_with_encounters.append(Template("""
#######
#11111#
#.....#
O.a2..+
#.....#
#11111#
#######
""",use_prob=0.1,level=3,lowercase_letters={'a':Special_grid(terrain='6',monster=M_APPRENTICE)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_WIZARD,E_HUMANOID]}))


templates_with_encounters.append(Template("""
###########
#111111111#
#.........#
#.....a...#
#.........#
#.s2..a...+
#.........#
#.....a...#
#.........#
#111111111#
###########
""",use_prob=0.5,level=6,lowercase_letters={'s':Special_grid(monster=M_SORCERER),'a':Special_grid(terrain='6',monster=M_APPRENTICE)},inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_WIZARD,E_HUMANOID]}))


templates_with_encounters.append(Template("""
###O###
#.....#
#..g..#
O.g4g.O
#..g..#
#.....#
###O###
""",use_prob=0.03,level=4,lowercase_letters={'g':Special_grid(monster=M_GOBLIN,terrain='6')},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_GOBLIN,E_HUMANOID]}))


templates_with_encounters.append(Template("""
#####O#####
#.........#
#.........#
#..g..g...#
#.........#
O.g..%..g.O
#.........#
#..g...g..#
#.........#
#.........#
#####O#####
""",use_prob=0.1,level=4,lowercase_letters={'g':Special_grid(monster=M_GOBLIN)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_GOBLIN,E_HUMANOID]}))


templates_with_encounters.append(Template("""
#####O#####
#.........#
#.7.....7.#
#.s..7..s.#
#....s....#
O.........O
#.7.....7.#
#.s..7..s.#
#....s....#
#.........#
#####O#####
""",use_prob=0.2,level=4,lowercase_letters={'s':Special_grid(monster=M_SKELETON)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_UNDEAD]}))


templates_with_encounters.append(Template("""
#################
#...............#
#..7.....7....7.#
O..s..7..s..7.s.O
#.....s.....s...#
#...............#
#####O#####O#####
""",use_prob=0.4,level=4,lowercase_letters={'s':Special_grid(monster=M_SKELETON)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_UNDEAD]}))


templates_with_encounters.append(Template("""
#################
#......sss......#
#.....sglgs.....#
O.....ssgs......O
#......ss.......#
#...............#
#####O#####O#####
""",use_prob=0.4,level=3,lowercase_letters={'l':Special_grid(monster=M_LEPRECHAUN),'s':Special_grid(object=O_SILVER,object_probability=0.7),'g':Special_grid(object=O_GOLD,object_probability=0.7)},inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_UNDEFENDED_TREASURE,E_HUMANOID]}))


templates_with_encounters.append(Template("""
###O###
#.....#
#...l.#
O.l4..O
#..l..#
#.....#
###O###
""",use_prob=0.03,level=4,lowercase_letters={'l':Special_grid(monster=M_LEPRECHAUN,terrain='6')},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_HUMANOID]}))


templates_with_encounters.append(Template("""
#####O#####
#.........#
#...**....#
#..*..**..#
#..*f...*.#
O.*.....*.O
#..*..f.*.#
#..**..*..#
#....**...#
#.........#
#####O#####
""",use_prob=0.2,level=5,lowercase_letters={'f':Special_grid(monster=M_FIRE_LIZARD)},inheritable_properties={TP_FIERY:1,TP_IS_ENCOUNTER:1}))


templates_with_encounters.append(Template("""
###########O###########
#####..............####
##.....**.....***....##
#...***************...#
#..*****************..#
O.********....*******.O
#*****......f.....****#
#***....f.......f...**#
#**.......####.......*#
#*.....###########...*#
#######################
""",use_prob=0.8,level=5,lowercase_letters={'f':Special_grid(monster=M_FIRE_LIZARD)},inheritable_properties={TP_FIERY:1,TP_IS_ENCOUNTER:1},self_only_properties={TP_ORGANIC:1}))


templates_with_encounters.append(Template("""
#######################
#*********************#
#*********************#
#*********...*********#
#********.....********#
+..........f..........+
#********.....********#
#*********...*********#
#*********************#
#*********************#
#######################
""",use_prob=0.8,level=4,lowercase_letters={'f':Special_grid(monster=M_FIRE_LIZARD)},inheritable_properties={TP_FIERY:1,TP_IS_ENCOUNTER:1,TP_CORRIDOR:1}))


templates_with_encounters.append(Template("""
#####O#####
#.........#
#.........#
#..g..a...#
#.........#
O.a..%..a.O
#.........#
#..g...g..#
#.........#
#.........#
#####O#####
""",use_prob=0.2,level=4,lowercase_letters={'g':Special_grid(monster=M_GOBLIN),'a':Special_grid(monster=M_GOBLIN_ARCHER)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_GOBLIN,E_HUMANOID]}))


templates_with_encounters.append(Template("""
###O###
#.....#
#..a..#
#.a.a.#
#.....#
#.....#
#.....#
#.....#
#.....#
#.....#
#.....#
#.....#
#.....#
#.....#
#.....#
#.....#
###+###
""",use_prob=0.5,level=4,lowercase_letters={'a':Special_grid(monster=M_GOBLIN_ARCHER,object=O_COPPER)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_GOBLIN,E_HUMANOID],TP_CORRIDOR:1}))


templates_with_encounters.append(Template("""
###########O###########
#.....................#
#.....................#
#.....................#
#.....................#
#........~~~~~........#
#.......~~~~~~~.......#
#......~~~~~~~~~......#
#.....~~~~~~~~~~~.....#
#.....~~~~~~~~~~~.....#
#....~~~~~~.a.~~~~....#
O....~~~~~acsca~~~....O
#....~~~~~~.c.~~~~....#
#.....~~~~~..~~~~.....#
#.....~~~~..~~~~~.....#
#......~~..~~~~~......#
#.........~~~~~.......#
#........~~~~~........#
#.....................#
#.....................#
#.....................#
#.....................#
###########O###########
""",use_prob=0.1,level=4,lowercase_letters={'a':Special_grid(monster=M_GOBLIN_ARCHER),'s':Special_grid(object=O_SILVER),'c':Special_grid(object=O_COPPER)},inheritable_properties={TP_WET:1,TP_IS_ENCOUNTER:1,TP_OPEN:1,TP_THEMES:[E_GOBLIN,E_HUMANOID]}))


templates_with_encounters.append(Template("""
###########O###########
#.....................#
#.....................#
#.....................#
#.....................#
#........~~~~~........#
#.....~~~~~~~~~~~.....#
#.....~~~~~~~~~~~.....#
#.....~~.......~~.....#
#....~~~..a....~~~....#
#....~~~.....a.~~~....#
O....~~~.......~~~....O
#....~~~.a.....~~~....#
#....~~~....a..~~~....#
#.....~~.......~~.....#
#.....~~~~~~~~~~~.....#
#.....~~~~~~~~~~~.....#
#........~~~~~........#
#.....................#
#.....................#
#.....................#
#.....................#
###########O###########
""",use_prob=0.1,level=4,lowercase_letters={'a':Special_grid(monster=M_GOBLIN_ARCHER)},inheritable_properties={TP_WET:1,TP_IS_ENCOUNTER:1,TP_OPEN:1,TP_THEMES:[E_GOBLIN,E_HUMANOID]}))


templates_with_encounters.append(Template("""
#######################
#....a......a...a...a.#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
+.....................+
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#BBBBBBBBBBBBBBBBBBBBB#
#...a...a........a..a.#
#######################
""",use_prob=0.5,level=4,lowercase_letters={'a':Special_grid(monster=M_GOBLIN_ARCHER)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_OPEN:1,TP_THEMES:[E_GOBLIN,E_HUMANOID]}))


templates_with_encounters.append(Template("""
#######################
#######################
#######################
#######################
#######################
#######################
##############......###
###########..........##
#######..............##
#####.....a..........##
##....................#
+.........a...........#
##....................#
#####.....a..........##
#######..............##
###########..........##
##############......###
#######################
#######################
#######################
#######################
#######################
#######################
""",use_prob=0.5,level=4,lowercase_letters={'a':Special_grid(monster=M_GOBLIN_ARCHER)},self_only_properties={TP_ORGANIC:1,TP_OPEN:1},inheritable_properties={TP_IS_GOOD_ENCOUNTER:1,TP_THEMES:[E_GOBLIN,E_HUMANOID]}))


templates_with_encounters.append(Template("""
###########
#111111111#
#.........#
#....i....#
#.........#
#...s2....+
#.........#
#....i....#
#.........#
#111111111#
###########
""",use_prob=0.5,level=7,lowercase_letters={'s':Special_grid(terrain='6',monster=M_SORCERER),'i':Special_grid(terrain='6',monster=M_INVISIBLE_STALKER)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_WIZARD,E_HUMANOID]}))


templates_with_encounters.append(Template("""
#######
#.....#
#...g.#
#.o4..O
#.....#
#.....#
#######
""",use_prob=0.2,level=4,lowercase_letters={'o':Special_grid(monster=M_OGRE,terrain='6'),'g':Special_grid(monster=M_GOBLIN)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_GOBLIN,E_HUMANOID]}))


templates_with_encounters.append(Template("""
#######################
#######################
#######################
#######################
#######################
+.....................+
###########.###########
#########.....#########
#########..o..#########
#########..s..#########
#######################
""",use_prob=0.9,level=4,lowercase_letters={'o':Special_grid(monster=M_OGRE),'s':Special_grid(object=O_SILVER)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_HUMANOID],TP_CORRIDOR:1}))


templates_with_encounters.append(Template("""
#####O#####
#.........#
#.........#
#.....o...#
#.........#
O..o.%....O
#.........#
#.....o...#
#.........#
#.........#
#####O#####
""",use_prob=0.25,level=5,lowercase_letters={'o':Special_grid(monster=M_OGRE)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_HUMANOID]}))


templates_with_encounters.append(Template("""
###########O###########
#.....................#
#..****...****...****.#
#..****...****...****.#
#..*s**...****...**s*.#
O..****...****...****.O
#..****...****...****.#
#..****...**s*...****.#
#..****...****...****.#
#.....................#
###########O###########
""",use_prob=0.5,level=4,lowercase_letters={'s':Special_grid(monster=M_SALAMANDER,terrain='*')},inheritable_properties={TP_FIERY:1,TP_IS_ENCOUNTER:1,TP_OPEN:1}))


templates_with_encounters.append(Template("""
#######################
#*********************#
#*********************#
#*********************#
#***************s*****#
#****s****************#
#*********************#
#*********************#
#*********************#
#**********...********#
#********......*******#
+...............***s**#
#*******........******#
#********......*******#
#**********..*********#
#***s******.**********#
#**********.**********#
#****s*****.**********#
#**********.**********#
#**********.*****s****#
#**********.**********#
#**********.**********#
###########+###########
""",use_prob=0.5,level=5,lowercase_letters={'s':Special_grid(monster=M_SALAMANDER,terrain='*')},inheritable_properties={TP_FIERY:1,TP_IS_ENCOUNTER:1},self_only_properties={TP_ORGANIC:1,TP_OPEN:1,TP_CORRIDOR:1}))


templates_with_encounters.append(Template("""
###########+###########
#*********...*********#
#*********************#
#**********.**********#
#*********************#
#*********.***********#
#*********************#
#**********.**********#
#*********************#
#*********.***********#
#********************s#
#s********.**********s#
#s********************#
#**********.**********#
#*********************#
#*********.***********#
#*********************#
#**********.**********#
#*********************#
#*********.***********#
#*********************#
#*********...*********#
###########+###########
""",use_prob=0.5,level=5,lowercase_letters={'s':Special_grid(monster=M_SALAMANDER,terrain='*')},inheritable_properties={TP_FIERY:1,TP_IS_ENCOUNTER:1,TP_OPEN:1,TP_CORRIDOR:1}))


templates_with_encounters.append(Template("""
###########
#.........#
#....***..#
#....*m*..#
#....***..#
#.s..*m*..+
#....***..#
#....*m*..#
#....***..#
#.........#
###########
""",use_prob=0.5,level=6,lowercase_letters={'s':Special_grid(monster=M_SORCERER),'m':Special_grid(terrain='*',monster=M_SALAMANDER)},inheritable_properties={TP_FIERY:1,TP_IS_ENCOUNTER:1,TP_THEMES:[E_WIZARD,E_HUMANOID]}))


templates_with_encounters.append(Template("""
#################
#...a.......aa..#
#...a...o....a..#
#..a........g...#
#....g.....gg...#
#....gggggg.....#
#...............#
#...............#
O...............O
#...............#
#...............#
#...............#
#...............#
#...............#
#...............#
#...............#
########+########
""",use_prob=0.5,level=6,lowercase_letters={'o':Special_grid(monster=M_OGRE,object=O_GOLD),'g':Special_grid(monster=M_GOBLIN,monster_probability=0.5),'a':Special_grid(monster=M_GOBLIN_ARCHER,object_probability=0.5)},inheritable_properties={TP_IS_ENCOUNTER:1,TP_CLASSIC:1,TP_OPEN:1,TP_THEMES:[E_GOBLIN,E_HUMANOID]}))


templates_with_encounters.append(Template("""
#################
#...a.......aa..#
#...a...s....a..#
#..a........g...#
#....g.....gg...#
#....gggggg.....#
#...............#
#...............#
O...............O
#...............#
#...............#
#...............#
#...............#
#...............#
#...............#
#...............#
########+########
""",use_prob=0.8,level=6,lowercase_letters={'s':Special_grid(monster=M_GOBLIN_SHAMAN,object=O_GOLD),'g':Special_grid(monster=M_GOBLIN,monster_probability=0.5),'a':Special_grid(monster=M_GOBLIN_ARCHER,object_probability=0.5)},inheritable_properties={TP_IS_ENCOUNTER:1,TP_CLASSIC:1,TP_OPEN:1,TP_THEMES:[E_GOBLIN,E_HUMANOID]}))


templates_with_encounters.append(Template("""
###########
#....s....#
#.........#
#..g..g...#
#.........#
O.g..%..g.O
#.........#
#..g...g..#
#.........#
#.........#
#####+#####
""",use_prob=0.5,level=5,lowercase_letters={'s':Special_grid(monster=M_GOBLIN_SHAMAN),'g':Special_grid(monster=M_GOBLIN)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_GOBLIN,E_HUMANOID]}))


templates_with_encounters.append(Template("""
###########
#....s....#
#....3....#
#.........#
#.g.....g.#
#..g.g.g..#
#.........#
#.........#
#.........#
#.........#
#####+#####
""",use_prob=0.8,level=5,lowercase_letters={'s':Special_grid(monster=M_GOBLIN_SHAMAN),'g':Special_grid(monster=M_GOBLIN)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_GOBLIN,E_HUMANOID]}))


templates_with_encounters.append(Template("""
#####O#####
#.........#
#.........#
#..o..o...#
#.........#
O.o..%..o.O
#.........#
#..o...o..#
#.........#
#.........#
#####O#####
""",use_prob=0.25,level=4,lowercase_letters={'o':Special_grid(monster=M_ORC)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_ORC,E_HUMANOID]}))


templates_with_encounters.append(Template("""
########O########
#/............./#
#./.........../.#
#.././//////./..#
#.../......./...#
#../././//././..#
#../../.../../..#
#../././s/././..#
O.././.s/s././..O
#../././s/././..#
#../../.../../..#
#../././//././..#
#.../......./...#
#.././//////./..#
#./.........../.#
#/............./#
########O########
""",use_prob=0.5,level=5,lowercase_letters={'s':Special_grid(monster=M_SPIDER,terrain='/')},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_OPEN:1,TP_THEMES:[E_CREEPY_CRAWLY]}))


templates_with_encounters.append(Template("""
#####O#####
#/......./#
#././//./.#
#../.../..#
#././/s./.#
O./.s//./.O
#././/s./.#
#../.../..#
#././//./.#
#/......./#
#####O#####
""",use_prob=0.2,level=5,lowercase_letters={'s':Special_grid(monster=M_SPIDER,terrain='/')},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_CREEPY_CRAWLY]}))


templates_with_encounters.append(Template("""
###O###
#/////#
#///s/#
O/s///O
#///s/#
#/////#
###O###
""",use_prob=0.02,level=5,lowercase_letters={'s':Special_grid(monster=M_SPIDER,terrain='/')},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_CREEPY_CRAWLY]}))


templates_with_encounters.append(Template("""
#################
#..////s/s/s///.#
#...//////////..#
O....////////...O
#....../.../....#
#...............#
#####O#####O#####
""",use_prob=0.5,level=5,lowercase_letters={'s':Special_grid(monster=M_SPIDER,terrain='/')},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_CREEPY_CRAWLY]}))


templates_with_encounters.append(Template("""
#################
#...............#
#...............#
+...s...s...s...+
#...............#
#...............#
#################
""",use_prob=0.5,level=4,lowercase_letters={'s':Special_grid(monster=M_STATUE)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_DISGUISED]}))


templates_with_encounters.append(Template("""
#######################
#######################
#######################
#####&#####&#####&#####
#.....................#
+....s.....s.....s....+
#.....................#
#####&#####&#####&#####
#######################
#######################
#######################
""",use_prob=0.9,level=4,lowercase_letters={'s':Special_grid(monster=M_STATUE)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_DISGUISED],TP_CORRIDOR:1}))


templates_with_encounters.append(Template("""
#################
#################
########s########
+...............+
########s########
#################
#################
""",use_prob=0.8,level=4,lowercase_letters={'s':Special_grid(monster=M_STATUE)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_DISGUISED],TP_CORRIDOR:1}))


templates_with_encounters.append(Template("""
#################
#################
#################
#################
#################
#################
###&##&##########
#........########
+.........#######
#.........#######
###&##s...&######
#######...#######
#######...#######
######&...&######
#######...#######
#######...#######
########+########
""",use_prob=0.9,level=4,lowercase_letters={'s':Special_grid(monster=M_STATUE)},inheritable_properties={TP_IS_ENCOUNTER:1,TP_THEMES:[E_DISGUISED]}))


templates_with_encounters.append(Template("""
###########
#....w....#
#.7.....7.#
#.s..7..s.#
#....s....#
O.........O
#.7.....7.#
#.s..7..s.#
#....s....#
#.........#
#####O#####
""",use_prob=0.3,level=6,lowercase_letters={'w':Special_grid(monster=M_WRAITH),'s':Special_grid(monster=M_SKELETON)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_UNDEAD]}))


templates_with_encounters.append(Template("""
###########
#.........#
#.........#
#.7.7.7.7.#
#..s.w.s..#
O.7.7.7.7.O
#..s.s.s..#
#.7.7.7.7.#
#.........#
#.........#
#####O#####
""",use_prob=0.5,level=6,lowercase_letters={'w':Special_grid(monster=M_WRAITH),'s':Special_grid(object=O_SILVER,object_probability=0.7)},inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_UNDEAD]}))


templates_with_encounters.append(Template("""
###########
#....s....#
#....3....#
#..w...w..#
#....w....#
#.........#
#.........#
#.........#
#.........#
#.........#
#####+#####
""",use_prob=0.5,level=7,lowercase_letters={'s':Special_grid(monster=M_GOBLIN_SHAMAN),'w':Special_grid(monster=M_WRAITH)},inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_UNDEAD]}))


templates_with_encounters.append(Template("""
#######################
#######################
#######################
#####&#####&#####&#####
#.....................#
O....7.....7.....7....O
#....w.....w.....w....#
#.....................#
#####&#####&#####&#####
#######################
#######################
""",use_prob=0.5,level=6,lowercase_letters={'w':Special_grid(monster=M_WIGHT)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_UNDEAD]}))


templates_with_encounters.append(Template("""
#######################
#######################
#######################
###&###&###&####...c.##
#......k......##..c.g##
+....k...........ws7.##
#.......k.....##..c.g##
###&###&###&####...c.##
#######################
#######################
#######################
""",use_prob=0.9,level=6,lowercase_letters={'w':Special_grid(monster=M_WIGHT,object=O_SWORD),'k':Special_grid(monster=M_SKELETON),'s':Special_grid(object=O_G_WARRIOR),'g':Special_grid(object=O_GOLD),'c':Special_grid(object=O_COPPER)},inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_UNDEAD]}))


templates_with_encounters.append(Template("""
#######
#...c.#
#..c.s#
+.cw7.#
#..c.s#
#...c.#
#######
""",use_prob=0.1,level=5,lowercase_letters={'w':Special_grid(monster=M_WIGHT,object=O_SWORD),'s':Special_grid(object=O_SILVER),'c':Special_grid(object=O_COPPER)},inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_UNDEAD]}))


templates_with_encounters.append(Template("""
#################
#################
#################
#################
#################
#################
#################
#################
+.......#########
#........########
#####s....#######
######s...#######
#######s..#######
########..#######
########..#######
########..#######
########+########
""",use_prob=0.9,level=4,lowercase_letters={'s':Special_grid(monster=M_SNAKE)},self_only_properties={TP_ORGANIC:1},inheritable_properties={TP_IS_ENCOUNTER:1,TP_THEMES:[E_CREEPY_CRAWLY],TP_CORRIDOR:1}))


templates_with_encounters.append(Template("""
#####O#####
#.........#
#.........#
#.........#
#....oo...#
O...oco...O
#...oo....#
#.........#
#.........#
#.........#
#####O#####
""",use_prob=0.2,level=5,lowercase_letters={'o':Special_grid(monster=M_ORC),'c':Special_grid(monster=M_ORC_CAPTAIN)},inheritable_properties={TP_IS_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_ORC,E_HUMANOID]}))


templates_with_encounters.append(Template("""
###########+###########
#~~~~~~~~~~.~~~~~~~~~~#
#~~~~~~~~~~.~~~~~~~~~~#
#~~~~~~~~~...~~~~~~~~~#
#~~~~~~~~.....~~~~~~~~#
#~~~~~~~~.....~~~~~~~~#
#~~~~m~~~~...~~~~~~~~~#
#~~~~~~~~~~.~~~~~~~m~~#
#~~~~~~~~~~.~~~~~~~~~~#
#~~~~~~~~~...~~~~~~~~~#
#~~~~m~~~.....~~~~~~~~#
#~~~~~~~~.....~~~~~m~~#
#~~~~~~~~.....~~~~~~~~#
#~~~~~~~~~...~~~~~~~~~#
#~~~~m~~~~~.~~~~~~~~~~#
#~~~~~~~~~~.~~~~~~~m~~#
#~~~~~~~~~...~~~~~~~~~#
#~~~~~~~~.....~~~~~~~~#
#~~~~~~~~.....~~~~~~~~#
#~~~~~~~~~...~~~~~~~~~#
#~~~~~~~~~~.~~~~~~~~~~#
#~~~~~~~~~~.~~~~~~~~~~#
###########+###########
""",use_prob=0.8,level=6,lowercase_letters={'m':Special_grid(monster=M_SEA_SERPENT,terrain='~')},inheritable_properties={TP_WET:1,TP_IS_ENCOUNTER:1,TP_OPEN:1,TP_CORRIDOR:1}))


templates_with_encounters.append(Template("""
#######################
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~m~~~~~~~~~~#
#~~~~m~~~~~~~~~~~m~~~~#
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~~~~...~~~~~~~~~#
#~~~~~~~.......~~~~~~~#
#~~~~~~.........~~~~~~#
#~~~~~~.........~~~~~~#
###########+###########
""",use_prob=0.5,level=5,lowercase_letters={'m':Special_grid(monster=M_SEA_SERPENT,terrain='~')},inheritable_properties={TP_WET:1,TP_IS_ENCOUNTER:1,TP_OPEN:1,TP_ORGANIC:1}))


templates_with_encounters.append(Template("""
###########O###########
#~~~~~~~~~....~~~~~~~~#
#~~~~~~..~~....~~~~~~~#
#~~~~~...~~~..~~~~~..~#
#~..~~...~~~~~~~~~....#
#....~~~~~~~..~~~~~..~#
#~..~~..~~~....~~~~~~~#
#~~~~....~~~..~~~..~~~#
#~~~~~..~~~~~~~~....~~#
#~~~~~~~~~~~~~~~~..~~~#
#.~~~~..~~~m~~~~~~~~..#
O..~~....~~~m~~~..~~..O
#..~~~..~~m~~~~....~..#
#~~~.~~~~~~m~~~~..~~~~#
#~....~~~~~~~~~~~~~~~~#
#~~..~~..~~~..~~~~~..~#
#~~~~~....~....~~~....#
#~~~~~~..~~~..~~~~~..~#
#~~..~~~~~~~~~~..~~~~~#
#~....~~~~~~~~....~~~~#
#~~..~~~~~..~~~..~~~~~#
#~~~~~~~~....~~~~~~~~~#
###########O###########
""",use_prob=0.1,level=5,lowercase_letters={'m':Special_grid(monster=M_SEA_SERPENT,terrain='~')},inheritable_properties={TP_WET:1,TP_IS_ENCOUNTER:1,TP_OPEN:1}))


templates_with_encounters.append(Template("""
#################
#################
#################
#################
#################
#################
#################
######~~~~~######
+....#~~~~~#....+
####.#~m~m~#.####
####.#~~~~~#.####
####.........####
#################
#################
#################
#################
#################
""",use_prob=0.9,level=5,lowercase_letters={'m':Special_grid(monster=M_SEA_SERPENT,terrain='~')},inheritable_properties={TP_WET:1,TP_IS_ENCOUNTER:1}))


templates_with_encounters.append(Template("""
#####O#####
#.........#
#.*******.#
#.**...**.#
#.*..o..*.#
O.*.ooo.*.O
#.*..o..*.#
#.**...**.#
#.*******.#
#.........#
#####O#####
""",use_prob=0.11,level=3,lowercase_letters={'o':Special_grid(object_probability=0.7,random_object=1)},inheritable_properties={TP_IS_GOOD_ENCOUNTER:1,TP_THEMES:[E_UNDEFENDED_TREASURE]}))


templates_with_encounters.append(Template("""
###O###
#.....#
#..o..#
O.o.o.O
#..o..#
#.....#
###O###
""",use_prob=0.1,level=3,lowercase_letters={'o':Special_grid(object_probability=0.7,random_object=1),'g':Special_grid(object_probability=1,random_good_object=1)},inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_UNDEFENDED_TREASURE]}))


templates_with_encounters.append(Template("""
###########
###########
###########
#####,,,,s#
#####,o,o,#
+...|,,g,,#
#####,o,o,#
#####,,,,,#
###########
###########
###########
""",use_prob=0.1,level=3,lowercase_letters={'o':Special_grid(terrain=',',object_probability=0.7,random_object=1),'g':Special_grid(terrain=',',object_probability=1,random_good_object=1),'s':Special_grid(terrain='@',signpost_message="Croesus was here")},
  inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},
  self_only_properties={TP_CLASSIC:1}))


templates_with_encounters.append(Template("""
###########
###########
###########
#####,,,,,#
#####mo.o,#
+...|m,g,,#
#####mo,o,#
#####,,,,,#
###########
###########
###########
""",use_prob=0.1,level=4,lowercase_letters={'o':Special_grid(terrain=',',object_probability=0.7,random_object=1),'g':Special_grid(terrain=',',object_probability=1,random_good_object=1),'m':Special_grid(terrain=',',monster_probability=1)},
  inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},
  self_only_properties={TP_CLASSIC:1}))


templates_with_encounters.append(Template("""
###########O###########
#.#...................#
#.#.#################.#
#.#.#...............#.#
#.#.#.#############.#.#
#.#.#.#...........#.#.#
#.#.#.#.#########.#.#.#
#.#.#.#.#.......#.#.#.#
#.#.#.#.###|###.#.#.#.#
#.#.#.#.#,,,,,#.#.#.#.#
#.#.#.#.#,ooo,#.#.#.#.#
+.#.#.#.#,ooo,#.#.#.#.+
#.#.#.#.#,ooo,#.#.#.#.#
#.#.#.#.#,,,,,#.#.#.#.#
#.#.#.#.#######.#.#.#.#
#.#.#.#.........#.#.#.#
#.#.#.#########.#.#.#.#
#.#.#...........#.#.#.#
#.#.#############.#.#.#
#.#...............#.#.#
#.#################.#.#
#...................#.#
###########O###########
""",use_prob=0.1,level=4,lowercase_letters={'o':Special_grid(terrain=',',object_probability=0.7,random_object=1),'g':Special_grid(terrain=',',object_probability=1,random_good_object=1),'m':Special_grid(terrain=',',monster_probability=1)},
  inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},
  self_only_properties={TP_MAZY:1}))


templates_with_encounters.append(Template("""
#######################
#.....................#
#.###################.#
#.#######XXXXX#######.#
#.#######XXXXX#######.#
#.#######XXXXX#######.#
#.#######XXXXX#######.#
#.#######XXXXX#######.#
#.#########.#########.#
#.#####.........#####.#
#|#####.m.m.m.m.#####[#
+.....................+
###########.###########
#######XXXXXXXXX#######
#######XXXXXXXXX#######
#XXXXX#XXXXXXXXX#XXXXX#
#XXXXX#XXXXXXXXX#XXXXX#
#XXXXX.XXXXXXXXX.XXXXX#
#XXXXX#XXXXXXXXX#XXXXX#
#XXXXX#XXXXXXXXX#XXXXX#
#######XXXXXXXXX#######
#######XXXXXXXXX#######
#######################
""",use_prob=0.04,level=4,lowercase_letters={'m':Special_grid(terrain=',',monster_probability=1)},
  inheritable_properties={TP_IS_ENCOUNTER:1},
  self_only_properties={TP_CLASSIC:1}))


templates_with_encounters.append(Template("""
###########
###########
###########
#####m,,o,#
#####mo,,o#
+...|m,g,,#
#####mo,,o#
#####m,o,,#
###########
###########
###########
""",use_prob=0.1,level=6,lowercase_letters={'o':Special_grid(terrain=',',object_probability=0.7,random_object=1),'g':Special_grid(terrain=',',object_probability=1,random_good_object=1),'m':Special_grid(terrain=',',monster_probability=1)},
  inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},
  self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_UNDEFENDED_TREASURE]}))


templates_with_encounters.append(Template("""
###########
###########
###########
#####m,,,,#
#####m,)g,#
+...|m,g(,#
#####m,?g,#
#####m,,,,#
###########
###########
###########
""",use_prob=0.1,level=7,lowercase_letters={'o':Special_grid(terrain=',',object_probability=0.7,random_object=1),'g':Special_grid(terrain=',',object_probability=1,random_good_object=1),'m':Special_grid(terrain=',',monster_probability=1)},
  inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},
  self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_UNDEFENDED_TREASURE]}))


templates_with_encounters.append(Template("""
###########
#~~~~~~~~~#
#~~######~#
#~~#,,,,#~#
#~~#,o,o#~#
+..|,,g,#~#
#~~#,o,o#~#
#~~#,,,,,~#
#~~######~#
#~~~~~~~~~#
###########
""",use_prob=0.1,level=3,lowercase_letters={'o':Special_grid(terrain=',',object_probability=0.7,random_object=1),'g':Special_grid(terrain=',',object_probability=1,random_good_object=1)},
  inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},
  self_only_properties={TP_CLASSIC:1,TP_WET:1,TP_THEMES:[E_UNDEFENDED_TREASURE]}))


templates_with_encounters.append(Template("""
###########
#*********#
#**######*#
#**#,,,,#*#
#**#,o,o#*#
+..|,,g,,*#
#**#,o,o#*#
#**#,,,,#*#
#**######*#
#*********#
###########
""",use_prob=0.1,level=4,lowercase_letters={'o':Special_grid(terrain=',',object_probability=1,random_object=1),'g':Special_grid(terrain=',',object_probability=1,random_good_object=1)},
  inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},
  self_only_properties={TP_CLASSIC:1,TP_FIERY:1,TP_THEMES:[E_UNDEFENDED_TREASURE]}))


templates_with_encounters.append(Template("""
#################
#################
#################
+..|,,,,,,oooo###
#################
#################
#################
""",use_prob=0.4,level=2,lowercase_letters={'o':Special_grid(terrain=',',object_probability=1,random_object=1),'g':Special_grid(terrain=',',object_probability=1,random_good_object=1)},
  inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},
  self_only_properties={TP_CLASSIC:1,TP_CORRIDOR:1,TP_THEMES:[E_UNDEFENDED_TREASURE]}))

 
templates_with_encounters.append(Template("""
#################
###CORRIDOR#OF###
#################
+..|,?,(,)ooog###
#################
#####TRIALS######
#################
""",use_prob=0.4,level=5,lowercase_letters={'o':Special_grid(terrain=',',object_probability=1,random_object=1),'g':Special_grid(terrain=',',object_probability=1,random_good_object=1)},
  inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},
  self_only_properties={TP_CLASSIC:1,TP_CORRIDOR:1,TP_THEMES:[E_UNDEFENDED_TREASURE]}))


templates_with_encounters.append(Template("""
#################
#################
#################
+..|,??,??oogg###
#################
#################
#################
""",use_prob=0.4,level=7,lowercase_letters={'o':Special_grid(terrain=',',object_probability=1,random_object=1),'g':Special_grid(terrain=',',object_probability=1,random_good_object=1)},
  inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},
  self_only_properties={TP_CLASSIC:1,TP_CORRIDOR:1,TP_THEMES:[E_UNDEFENDED_TREASURE]}))

templates_with_encounters.append(Template("""
###########
####THE####
##ARMOURY##
###########
#.........#
O..a...h..O
#...d.f...#
#..b...i..#
#...e.g...#
#..c...j..#
#####O##### 
""",use_prob=0.01,level=3,lowercase_letters={
  'a':Special_grid(object=O_SHORTSWORD),
  'b':Special_grid(object=O_AXE),
  'c':Special_grid(object=O_MACE),
  'd':Special_grid(object=O_BOW),
  'e':Special_grid(object=O_CROSSBOW),
  'f':Special_grid(object=O_G_WARRIOR),
  'g':Special_grid(object=O_BOOTS),
  'h':Special_grid(object=O_SPEAR),
  'i':Special_grid(object=O_SWORD),
  'j':Special_grid(object=O_POISONED_DAGGER)},  
self_only_properties={TP_NEVER_ROTATE:1,TP_CLASSIC:1},inheritable_properties={TP_IS_GOOD_ENCOUNTER:1,TP_THEMES:[E_UNDEFENDED_TREASURE]}))

templates_with_encounters.append(Template("""
###########
####THE####
##ARSENAL##
###########
#....c....#
O..a...f..O
#....d....#
#..b...g..#
#....e....#
#.........#
#####O##### 
""",use_prob=0.01,level=5,lowercase_letters={
  'a':Special_grid(object=O_GREAT_AXE),
  'b':Special_grid(object=O_FLAIL),
  'c':Special_grid(object=O_ELVEN_BOW),
  'd':Special_grid(object=O_G_WARRIOR),
  'e':Special_grid(object=O_G_CRUSADER),
  'f':Special_grid(object=O_WARLOCK_SWORD),
  'g':Special_grid(object=O_TROLLISH_SHORTSWORD)},  
self_only_properties={TP_NEVER_ROTATE:1,TP_CLASSIC:1},inheritable_properties={TP_IS_GOOD_ENCOUNTER:1,TP_THEMES:[E_UNDEFENDED_TREASURE]}))

templates_with_encounters.append(Template("""
###########
####THE####
###APOTH###
###ECARY###
###########
O.........O
#..a.c.e..#
#...b.f...#
#..a.c.e..#
#...f.g...#
#####O##### 
""",use_prob=0.01,level=4,lowercase_letters={
  'a':Special_grid(object=O_HEALING_POT),
  'c':Special_grid(object=O_MAGIC_POT),
  'b':Special_grid(object=O_ANTIDOTE_POT),
  'e':Special_grid(object=O_FIRERES_POT),
  'f':Special_grid(object=O_CHAMELEON_POT),
  'f':Special_grid(object=O_STONESKIN_POT),
  'g':Special_grid(object=O_BLINK_POT)},  
self_only_properties={TP_NEVER_ROTATE:1,TP_CLASSIC:1},inheritable_properties={TP_IS_GOOD_ENCOUNTER:1,TP_THEMES:[E_UNDEFENDED_TREASURE]}))

templates_with_encounters.append(Template("""
#######
#,,,,,#
#,oso,#
O,sgs,O
#,oso,#
#,,,,,#
#######
""",use_prob=0.03,level=4,lowercase_letters={'o':Special_grid(terrain=',',object_probability=1,random_object=1),'g':Special_grid(terrain=',',object=O_GOLD),'s':Special_grid(terrain=',',object=O_SILVER)},
  inheritable_properties={TP_IS_GOOD_ENCOUNTER:1},
  self_only_properties={TP_CLASSIC:1,TP_THEMES:[E_UNDEFENDED_TREASURE]}))
